package dturner.com;

import java.io.File;
import java.util.ArrayList;

public class FileUtils {

  public static ArrayList<String> getTextFiles(String s) throws Exception
  {
    String[] children = new File(s).list();
    ArrayList<String> result = new ArrayList<String>();
    
    if (children == null) {
      return null;
    } else {
        for (int i=0; i<children.length; i++) {
          if(children[i].indexOf(".txt") > 0 || children[i].indexOf(".TXT") > 0)
            result.add(s + "/" + children[i]);
        }
       
      return result;
    } 
     
  }

}
